<script setup lang="ts">
import { useUserStore } from './stores/userStore/user'



const userStore =  useUserStore()
</script>

<template>
  <div class="nav">
  
<van-tabbar route safe-area-inset-bottom>
  <van-tabbar-item  to="/home" icon="home-o">主页</van-tabbar-item>
  <van-tabbar-item to="/sort" icon="wap-nav">菜单</van-tabbar-item>
  <van-tabbar-item replace to="/find" icon="search">发现</van-tabbar-item>
  <van-tabbar-item  to="/cart" icon="cart-o"  :badge="`${userStore.shopCar.length}`">购物车</van-tabbar-item> 
  <van-tabbar-item replace to="/user" icon="user-o">用户</van-tabbar-item>
</van-tabbar>
    
  </div>


  <div>
    <router-view></router-view>
  </div>
</template>

<style scoped></style>
